﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Register.aspx.cs" Inherits="Register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>XCommunity - 成员注册</title>
  <style>
    table
    {
      font-size: 12px;
    }
  </style>
</head>
<body>
  <div style="text-align: center;">
    <div style="padding-top: 30px; padding-bottom: 15px; font-size: 40px; font-family: Arial;">XCommunity</div>
    <div style="padding: 10px; font-size: 20px; font-family: 黑体">成员注册</div>

    <form method="post" action="Register.aspx" onsubmit="return OnSubmit();">

      <script language="javascript" type="text/javascript">

      function $(elementId)
      {
        return document.getElementById(elementId);
      }

      function OnSubmit()
      {
        if ($("Password").value != $("RetypePassword").value)
        {
          window.alert("两次输入密码不一致，请核实");
          return false;
        }
      }
      </script>

      <div>

        <table border="0" cellpadding="5" cellspacing="0">
          <tr>
            <td align="right">用户名:</td>
            <td colspan="2"><input type="text" name="Username" id="Username" style="width: 190px;" /></td>
          </tr>
          <tr>
            <td align="right">密码:</td>
            <td colspan="2"><input type="password" name="Password" id="Password" style="width: 190px;" /></td>
          </tr>
          <tr>
            <td align="right">确认密码:</td>
            <td colspan="2"><input type="password" id="RetypePassword" style="width: 190px;" /></td>
          </tr>
          <tr>
            <td align="right">请输入您看到的字符:</td>
            <td style="width: 115px;"><img src="ValidateCode.ashx" alt="验证码" onclick="this.src='ValidateCode.ashx?'+Math.random(); document.getElementById('ValidateCode').value = ''; document.getElementById('ValidateCode').focus();" style="cursor: pointer;" /></td>
            <td style="width: 50px;"><input type="text" size="11" maxlength="7" id="ValidateCode" style="font-family: Arial Narrow; font-style: italic;" name="ValidateCode" onkeyup=" if ( event.keyCode >= 65 && event.keyCode <= 90 ) this.value = this.value.toUpperCase();" autocomplete="off" /></td>
          </tr>
          <tr>
            <td align="center" colspan="3"><input type="submit" id="SubmitButton" value="注   册" /></td>
          </tr>
        </table>

        <script type="text/javascript" language="javascript">
          window.onload = function()
          {
            document.getElementById("ValidateCode").value = "";
          }
        </script>

      </div>
    </form>

  </div>
</body>
</html>
